#include "sdlKeyboard.h"

int SDL_Keyboard::init ( void* data) {
   return 0;
}

int SDL_Keyboard::getEvent () {
   SDL_Event event;
   int key = 0;

   if( SDL_PollEvent( &event ) ) {
      if( event.type == SDL_KEYDOWN ) {
	 key = event.key.keysym.sym;
      }
   }
#define CASE( key ) case SDLK_##key : return AG_KEY_##key
   switch ( key ) {
      CASE( UP );
      CASE( DOWN );
      CASE( LEFT );
      CASE( RIGHT );
      default : return key;
#undef CASE
   }
}
